package com.alibaba.csp.sentinel.dashboard.repository.dao;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
@ConfigurationProperties(prefix = "sentinel.mysql")
public class DbConfig {

    private Readonly readonly;
    private String password;
    private String userName;
    private String url;

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
            this.password =password;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Readonly getReadonly() {
        return readonly;
    }

    public void setReadonly(Readonly readonly) {
        this.readonly = readonly;
    }


    public static class Readonly extends DbConfig {

    }

}
